package com.user.user;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

/**
 * @author 86131
 */
@SpringBootApplication
@EnableEurekaClient
@RestController
@EnableFeignClients
public class UserApplication {

    public static void main(String[] args) {
        SpringApplication.run(UserApplication.class, args);
    }


    @RequestMapping("test")
    public List<String> test() throws InterruptedException {
        Thread.sleep(200);
//        if ("c".equals("c")){
//            throw new RuntimeException("这个是我的错误");
//        }

        List<String> list=new ArrayList<>();
        list.add(BigDecimal.ZERO+"");
        list.add(BigDecimal.ONE+"");
        list.add(BigDecimal.ROUND_HALF_DOWN+"");
        return list;
    }



    @RequestMapping("test1")
    public List<String> test1() throws InterruptedException {
        Thread.sleep(200);
//        if ("c".equals("c")){
//            throw new RuntimeException("这个是我的错误");
//        }

        List<String> list=new ArrayList<>();
        list.add(BigDecimal.ZERO+"");
        list.add(BigDecimal.ONE+"");
        return list;
    }

}
